package com.avic.modules.record.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author zhangzikang 昨天记录表
 * @date 2022-08-14
 */
@Data
@TableName("yesterday")
@NoArgsConstructor
public class Yesterday implements Serializable {

    // 记录id
    private String id;

    // 设备id
    private String equipId;

    // 设备运行状态
    private Integer functionType;

    // 设备健康状态
    private Integer healthyType;

    // 设备所属类别
    private Long category;

    // 设备所属站位
    private String station;

    // 站位数
    @TableField(exist = false)
    private Integer numberOfStations;

    // 设备数
    @TableField(exist = false)
    private Integer equipNumber;

    // 运行设备数
    @TableField(exist = false)
    private Integer functionNumber;

    // 健康设备数
    @TableField(exist = false)
    private Integer healthyNumber;

    // 运行站位数
    @TableField(exist = false)
    private Integer functionStationNumber;

    // 健康站位数
    @TableField(exist = false)
    private Integer healthyStationNumber;


    public void copy(Yesterday source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
